home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpC_403_DoMenuItem.Edit < prev    next >
Encoding:
Text File  |  1990-03-23  |  872 b   |  56 lines

  1. %if MenuItemName = Cut%
  2.     /*----------*/
  3.     void DoCut (void);
  4.     void DoCut ()
  5.     {
  6.         if (cur->text != nil) {
  7.             TECut (cur->text);
  8.             scrapDirty = true;
  9.         }
  10.     } /*DoCut*/
  11.  
  12. %elsif MenuItemName = Copy%
  13.     /*----------*/
  14.     void DoCopy (void);
  15.     void DoCopy ()
  16.     {
  17.         if (cur->text != nil) {
  18.             TECopy (cur->text);
  19.             scrapDirty = true;
  20.         }
  21.     } /*DoCopy*/
  22.  
  23. %elsif MenuItemName = Paste%
  24.     /*----------*/
  25.     void DoPaste (void);
  26.     void DoPaste ()
  27.     {
  28.         if (cur->text != nil) {
  29.             TEPaste (cur->text);
  30.         }
  31.     } /*DoPaste*/
  32.  
  33. %elsif MenuItemName = Clear%
  34.     /*----------*/
  35.     void DoClear (void);
  36.     void DoClear ()
  37.     {
  38.         if (cur->text != nil) {
  39.             TEDelete (cur->text);
  40.         }
  41.     } /*DoClear*/
  42.  
  43. %elsif MenuItemName = SelectAll%
  44.     /*----------*/
  45.     void DoSelectAll (void);
  46.     void DoSelectAll ()
  47.     {
  48.         if (cur->text != nil) {
  49.             TESetSelect (0, 32767, cur->text);
  50.         }
  51.     } /*DoSelectAll*/
  52.  
  53. %else%
  54.     %DoMenuItem%
  55. %end if%
  56.